package com.pz.cloud.framework.workflow.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.pz.cloud.framework.business.workflow.entity.WaitDoneUser;
import com.pz.cloud.framework.business.workflow.service.IWaitDoneUserService;
import com.pz.cloud.framework.workflow.mapper.WaitDoneUserMapper;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * 待办人
 * @author mazezhan
 */
@Transactional(rollbackFor = Exception.class)
@Service
public class WaitDoneUserServiceImpl extends ServiceImpl<WaitDoneUserMapper,WaitDoneUser> implements IWaitDoneUserService {

   public void deleteByWaitDoneId(String waitDoneId){
       LambdaQueryWrapper<WaitDoneUser> queryWrapper = new LambdaQueryWrapper<>();
       queryWrapper.eq(WaitDoneUser::getWaitDoneId,waitDoneId);
       super.remove(queryWrapper);
   }
    @Override
    public List<WaitDoneUser> findByWaitDoneId(String waitDoneId) {
        LambdaQueryWrapper<WaitDoneUser> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(WaitDoneUser::getWaitDoneId,waitDoneId);
        return super.list(queryWrapper);
    }
}
